<!DOCTYPE html>
<html lang="en">
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/static/js/jquery.min.js"></script>
    <script>
        function goPage(pageIndex) {
            var pageIndex = pageIndex;
            window.location.href = "/user/findAll?pageIndex="+pageIndex;
        }
        function findUserById (uid) {
            var uid = uid;
            window.location.href="/user/findOne?uid="+uid;
        }
        function goAdd() {
            window.location.href="/user_add.html";
        }
    </script>
</head>
    <body>
    <h1>数据展示</h1>
    <form action="/user/findUserByPage" method="get">
        请输入搜索关键字: <input type="search" name="searchContent"/>
        <input type="submit"/>
    </form>
    <input type="button" value="添加新学生" onclick="goAdd();" />
    <table border="1">
        <tr>
        <th colspan="5">
            <!--/*@thymesVar id="totalCount" type="java.lang.Integer"*/-->
            <p th:text="'一共查询出'+${totalCount} +'条数据,每页展示'+${pageSize}+'条数据,一共展示'+${totalPage}+'页,当前为第'+${pageIndex+1}+'页'"></p>
        </th>
        </tr>
        <tr>
            <th>用户名称</th>
            <th>用户地址</th>
        </tr>

        <!--/*@thymesVar id="pageList" type="java.util.List"*/-->
        <tr th:each="user : ${pageList}">
            <td th:text="${user.uid}" style="display: none;text-align: center"></td>
            <td th:text="${user.name}" style="text-align: center"></td>
            <td th:text="${user.address}" style="text-align: center"></td>
        </tr>
        </tr>
    </table>

    </body>
</html>